package cn.pli.bike.ui;

import android.support.v7.widget.RecyclerView;

import com.framemodule.utils.CommonUtils;

import cn.bingoogolapple.androidcommon.adapter.BGARecyclerViewAdapter;
import cn.bingoogolapple.androidcommon.adapter.BGAViewHolderHelper;
import cn.pli.bike.R;
import cn.pli.bike.bean.CouponBean;
import cn.pli.bike.bean.ExpensesRecordBean;

/**
 * Created by shangdongzhou on 2017/11/19.
 */

public class CouponDetailAdapter extends BGARecyclerViewAdapter<CouponBean> {

    public CouponDetailAdapter(RecyclerView recyclerView) {
        super(recyclerView, R.layout.item_coupon_detail);
    }

    @Override
    protected void fillData(BGAViewHolderHelper helper, int position, CouponBean model) {
        helper.getTextView(R.id.tv_coupon_amount).setText(mContext.getString(R.string.money) + model.getAmount() + mContext.getString(R.string.rmb));
        helper.getTextView(R.id.tv_coupon_timeout).setText(mContext.getString(R.string.deadline) + CommonUtils.parseDateTime(model.getTimeOut()));
        helper.getTextView(R.id.tv_coupon_usearea).setText(mContext.getString(R.string.user_area) + model.getUseArea());

    }
}
